package com.gitee.huxing.course.config;

import org.I0Itec.zkclient.ZkClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Description: zookeeper客户端集群配置
 * @ProjectName: gdca-platform
 * @Package: com.gdca.cert.config
 * @ClassName: ZkClientConfig
 * @Author: huxing
 * @DateTime: 2021-08-20 下午2:22
 */
@Configuration
public class ZkClientConfig {

    @Value("${spring.zookeeper.hosts}")
    private String connection;

    @Bean(name = "zkClient")
    public ZkClient connectionZkCluster(){
        return new ZkClient(connection);
    }
}
